/**
 * Copyright (c) 2010 Jumbomart All Rights Reserved.
 *
 * This software is the confidential and proprietary information of Jumbomart.
 * You shall not disclose such Confidential Information and shall use it only in
 * accordance with the terms of the license agreement you entered into
 * with Jumbo.
 *
 * JUMBOMART MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
 * SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 * PURPOSE, OR NON-INFRINGEMENT. JUMBOMART SHALL NOT BE LIABLE FOR ANY DAMAGES
 * SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
 * THIS SOFTWARE OR ITS DERIVATIVES.
 *
 */
package com.p2p.backend.command;

import com.p2p.backend.model.BackUser;


public class UserCommand{

	private Long		userId;

	private String		loginName;

	private String		password;

	private String		passwordAgain;

	private String		userName;

	private String		newPassword;

	private String		confirmPassword;

	private String[]	roles;

	private Boolean		is_enabled;
	
	private String      email;
	
	private String      phone;

	public Long getUserId(){
		return userId;
	}

	public void setUserId(Long userId){
		this.userId = userId;
	}

	public String getUserName(){
		if (userName == null){
			return null;
		}else{
			return userName.replace("<", "&lt;").replace(">", "&gt;").replace("'", "&quot;").replace("\"", "&quot;").replace("&", "&amp;");
		}
	}

	public void setUserName(String userName){
		this.userName = userName;
	}

	public String getLoginName(){
		if (loginName == null){
			return null;
		}else{
			return loginName.replace("<", "&lt;").replace(">", "&gt;").replace("'", "&quot;").replace("\"", "&quot;").replace("&", "&amp;");
		}
	}

	public void setLoginName(String loginName){
		this.loginName = loginName;
	}

	public String getPassword(){
		return password;
	}

	public void setPassword(String password){
		this.password = password;
	}

	public String getPasswordAgain(){
		return passwordAgain;
	}

	public void setPasswordAgain(String passwordAgain){
		this.passwordAgain = passwordAgain;
	}

	public BackUser getUser(){
		BackUser user = new BackUser();
		user.setLoginName(loginName);
		user.setPassword(password);
		user.setUserName(userName);
		return user;
	}

	public String getConfirmPassword(){
		return confirmPassword;
	}

	public void setConfirmPassword(String confirmPassword){
		this.confirmPassword = confirmPassword;
	}

	public String getNewPassword(){
		return newPassword;
	}

	public void setNewPassword(String newPassword){
		this.newPassword = newPassword;
	}

	public String[] getRoles(){
		return roles;
	}

	public void setRoles(String[] roles){
		this.roles = roles;
	}

	public Boolean getIs_enabled(){
		return is_enabled;
	}

	public void setIs_enabled(Boolean isEnabled){
		is_enabled = isEnabled;
	}

	public String getEmail() {
		return this.email;
	}

	public void setEmail(String email) {
		this.email = email;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getPhone() {
		return phone;
	}
}
